<template>
	<view>
        <u-navbar
            title="添加技能"
			rightText="保存"
			placeholder="true"
            @rightClick="into"
            :autoBack="true"
        >
        </u-navbar>
		<view>
			<view>
				<h3 class="h">技能信息</h3>
				<view >
					<view class="txt"><text class="red">*</text><text class="tet">技能名称</text></view>
					 <u--input
						class="shuru"
					    placeholder="请输入"
					    border="surround"
					    v-model="data.skname"
					  ></u--input>
				</view>
				<view>
					<view class="txt"><text class="red">*</text><text class="tet">技能类型</text></view>
					 <u--input
						class="shuru"
					    placeholder="请输入"
					    border="surround"
					    v-model="data.sktype"
					  ></u--input>
				</view>
				<view>
					<view class="txt"><text class="tet">掌握程度</text></view>
					 <u--input
						class="shuru"
					    placeholder="请输入"
					    border="surround"
					    v-model="data.degree"
					  ></u--input>
				</view>
				
			<view>
				<view class="txt"><text class="tet">备注</text></view>
				 <u--input
					class="shuru"
				    placeholder="请输入"
				    border="surround"
				    v-model="data.remarks"
				  ></u--input>
			</view>
		</view>
	</view>
	</view>
</template>

<script>
    export default {
        data() {
          return {
			data:{
				skname:"",
				sktype:"",
				degree:"",
				remarks:"",
				userId:""
			}
          }
        },
		onLoad(options) {
			this.data.userId=options.jid
			console.log(this.data.jid)
		},
        methods: {
			radioChange(e) {
			                this.data.sex = this.radio = e.detail.value
			            },
			confirm(e) {
				console.log(e);
				this.data.birthday = e;
				this.show2=false
		  },
          open() {
            // console.log('open');
          },
          close() {
            this.show = false
            // console.log('close');
          },
		  into(){
			  console.log(this.data),
		  	this.$request({
		  		url: 'entry/ruzhi/jineng',
		  		data: 
		  			this.data
		  		,
		  		method: 'post',
		  		success: (res) => {
		  			this.review(),
		  			this.value=""
		  		}
		  		
		  	})
		  	uni.navigateTo({
		  		url:'./tianjiaruzhi?jId='+this.data.userId-1
		  	})
		  	},
			
        }
      }
</script>
<style>
	.red{
		color: red;
	}
	.shuru{
		margin-top: 30rpx;
		height: 20px;
		float:left;
		width: 72%;
	}
	.txt{
		margin-left: 20rpx;
		margin-top: 30rpx;
		float:left;
		width: 17%;
	}
	.h{
		margin-left: 25rpx;
	}
	.danyuan{
		margin-top: 20rpx;
		float:left;
		width: 100%;
	}
	.tet{
		color: #74777a;
	}
	.shuru1{
		margin-top: 30rpx;
		float:left;
		width: 80%;
	}
</style>